set terminal pdf
set output 'result.pdf'

#set logscale x
#set logscale y
set xrange [1:32]
#set yrange [1e-6:1000]

set grid
set key bottom center

set xlabel 'Threads'
set ylabel 'Runtime [s]'

set y2label 'Speedup'
set ytics nomirror
set y2tics
#set y2range [0.1:10]

set title '100x100 Matrix'
file = "./data/res_dim100.log"
plot \
file using 1:3 title "runtime" with linespoints axes x1y1, \
file using 1:4 title "speedup" with linespoints axes x1y2

set title '500x500 Matrix'
file = "./data/res_dim500.log"
plot \
file using 1:3 title "runtime" with linespoints axes x1y1, \
file using 1:4 title "speedup" with linespoints axes x1y2

set title '1000x1000 Matrix'
file = "./data/res_dim1000.log"
plot \
file using 1:3 title "runtime" with linespoints axes x1y1, \
file using 1:4 title "speedup" with linespoints axes x1y2

set title '10000x10000 Matrix'
file = "./data/res_dim10000.log"
plot \
file using 1:3 title "runtime" with linespoints axes x1y1, \
file using 1:4 title "speedup" with linespoints axes x1y2

